<template name="noticeItem">
	<!-- 店铺基本资料未通过 -->
	<block v-if="notice.type == 1">
		<view class="noticeBox">
			<text class="title">店铺基本资料——审核未通过</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">店铺：</text>
					<text class="value">{{ notice.storeName }}</text>
				</view>
			</view>
			<text class="nociceText">您于 {{ notice.createTime }} 提交的店铺基本资料，因不符合平台规范未通过审核，请修改后重新提交。</text>
		</view>
	</block>
	<!-- 店铺基本资料通过 -->
	<block v-else-if="notice.type == 2">
		<view class="noticeBox">
			<text class="title">店铺基本资料——审核通过</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">店铺：</text>
					<text class="value">{{ notice.storeName }}</text>
				</view>
			</view>
			<text class="nociceText">您于 {{ notice.createTime }} 提交的店铺基本资料已通过审核，新的资料将展示给找培训平台用户。</text>
		</view>
	</block>
	<!-- 店铺主图未通过 -->
	<block v-else-if="notice.type == 3">
		<view class="noticeBox">
			<text class="title">店铺主图——审核未通过</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">店铺：</text>
					<text class="value">{{ notice.storeName }}</text>
				</view>
			</view>
			<text class="nociceText">您于 {{ notice.createTime }} 提交的店铺主图图片因不符合平台规范未通过审核，请重新上传。</text>
		</view>
	</block>
	<!-- 店铺主图通过 -->
	<block v-else-if="notice.type == 4">
		<view class="noticeBox">
			<text class="title">店铺主图——审核通过</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">店铺：</text>
					<text class="value">{{ notice.storeName }}</text>
				</view>
			</view>
			<text class="nociceText">您于 {{ notice.createTime }} 提交的店铺主图通过审核，新图片将展示给找培训平台用户。</text>
		</view>
	</block>
	<!-- 名师审核未通过 -->
	<block v-else-if="notice.type == 5">
		<view class="noticeBox">
			<text class="title">名师资料——审核未通过</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">店铺：</text>
					<text class="value">{{ notice.storeName }}</text>
				</view>
			</view>
			<text class="nociceText">
				您于 {{ notice.createTime }} 提交的名师资料（名师ID：{{ notice.linkId }}）因不符合平台规范未通过审核，如有需要请重新上传。当前展示的是上一次通过审核的资料
			</text>
		</view>
	</block>
	<!-- 名师审核通过 -->
	<block v-else-if="notice.type == 6">
		<view class="noticeBox">
			<text class="title">名师资料——审核通过</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">店铺：</text>
					<text class="value">{{ notice.storeName }}</text>
				</view>
			</view>
			<text class="nociceText">您于 {{ notice.createTime }} 提交的名师资料（名师ID：{{ notice.linkId }}）已通过审核，新资料将展示给找培训平台用户。</text>
		</view>
	</block>
	<!-- 课程信息审核通过 -->
	<block v-else-if="notice.type == 7">
		<view class="noticeBox">
			<text class="title">课程信息——审核通过</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">店铺：</text>
					<text class="value">{{ notice.storeName }}</text>
				</view>
			</view>
			<text class="nociceText">您于 {{ notice.createTime }} 提交的课程（课程ID：{{ notice.linkId }}）已通过审核，新课程信息将展示给找培训平台用户。</text>
		</view>
	</block>
	<!-- 课程信息审核未通过 -->
	<block v-else-if="notice.type == 8">
		<view class="noticeBox">
			<text class="title">课程信息—审核未通过</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">店铺：</text>
					<text class="value">{{ notice.storeName }}</text>
				</view>
			</view>
			<text class="nociceText">您于 {{ notice.createTime }} 提交的课程（课程ID：{{ notice.linkId }}）因不符合平台规范未通过审核，请重新上传。</text>
		</view>
	</block>
	<!-- 课程主图审核通过 -->
	<block v-else-if="notice.type == 9">
		<view class="noticeBox">
			<text class="title">课程主图——审核通过</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">店铺：</text>
					<text class="value">{{ notice.storeName }}</text>
				</view>
			</view>
			<text class="nociceText">您于 {{ notice.createTime }} 提交的课程（课程ID：{{ notice.linkId }}）已通过审核，新课程主图将展示给找培训平台用户。</text>
		</view>
	</block>
	<!-- 课程主图审核未通过 -->
	<block v-else-if="notice.type == 10">
		<view class="noticeBox">
			<text class="title">课程主图—审核未通过</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">店铺：</text>
					<text class="value">{{ notice.storeName }}</text>
				</view>
			</view>
			<text class="nociceText">您于 {{ notice.createTime }} 提交的课程（课程ID：{{ notice.linkId }}）因不符合平台规范未通过审核，请重新上传。</text>
		</view>
	</block>
	<!-- 提现成功 -->
	<block v-else-if="notice.type == 11">
		<view class="noticeBox">
			<text class="title">提现成功</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">店铺：</text>
					<text class="value">{{ notice.storeName }}</text>
				</view>
			</view>
			<text class="nociceText">您于 {{ notice.createTime }} 发起的提现订单（订单编号：{{ notice.orderNo }}）已提现成功。</text>
		</view>
	</block>
	<!-- 提现失败 -->
	<block v-else-if="notice.type == 12">
		<view class="noticeBox">
			<text class="title">提现失败</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">店铺：</text>
					<text class="value">{{ notice.storeName }}</text>
				</view>
			</view>
			<text class="nociceText">您于 {{ notice.createTime }} 发起的提现订单（订单编号：{{ notice.orderNo }}）提现失败。</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">原因：</text>
					<text class="value">{{ notice.reason }}</text>
				</view>
			</view>
		</view>
	</block>
	<!-- 充值审核成功 -->
	<block v-else-if="notice.type == 13">
		<view class="noticeBox">
			<text class="title">充值成功</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">店铺：</text>
					<text class="value">{{ notice.storeName }}</text>
				</view>
			</view>
			<text class="nociceText">您于 {{ notice.createTime }} 提交的充值订单（订单编号：{{ notice.orderNo }}）已于{{ notice.updateTime }} 充值成功，请核对资金账户。</text>
		</view>
	</block>
	<!-- 充值审核未通过 -->
	<block v-else-if="notice.type == 14">
		<view class="noticeBox">
			<text class="title">充值失败</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">店铺：</text>
					<text class="value">{{ notice.storeName }}</text>
				</view>
			</view>
			<text class="nociceText">您于 {{ notice.createTime }} 提交的充值订单（订单编号：{{ notice.orderNo }}）充值失败。</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">原因：</text>
					<text class="value">{{ notice.reason }}</text>
				</view>
			</view>
		</view>
	</block>

	<!-- 新订单 -->
	<block v-else-if="notice.type == 15">
		<view class="noticeBox">
			<text class="title">新订单</text>
			<text class="nociceText">{{ notice.courseName }}</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">买家昵称：</text>
					<text class="value">{{ notice.buyer }}</text>
				</view>
				<view class="row">
					<text class="label">订单金额：</text>
					<text class="value">{{ notice.price }}</text>
				</view>
			</view>
			<view class="opBox"><button @tap="toOrder" :data-id="notice.orderNo">查看详情</button></view>
		</view>
	</block>
	<!-- 已付预约金 -->
	<block v-else-if="notice.type == 16">
		<view class="noticeBox">
			<text class="title">已支付预约金</text>
			<text class="nociceText">{{ notice.courseName }}</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">买家昵称：</text>
					<text class="value">{{ notice.buyer }}</text>
				</view>
				<view class="row">
					<text class="label">订单金额：</text>
					<text class="value">{{ notice.price }}</text>
				</view>
			</view>
			<view class="opBox"><button @tap="toOrder" :data-id="notice.orderNo">查看详情</button></view>
		</view>
	</block>
	<!-- 已付尾款 -->
	<block v-else-if="notice.type == 17">
		<view class="noticeBox">
			<text class="title">已支付尾款</text>
			<text class="nociceText">{{ notice.courseName }}</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">买家昵称：</text>
					<text class="value">{{ notice.buyer }}</text>
				</view>
				<view class="row">
					<text class="label">订单金额：</text>
					<text class="value">{{ notice.price }}</text>
				</view>
			</view>
			<view class="opBox"><button @tap="toOrder" :data-id="notice.orderNo">查看详情</button></view>
		</view>
	</block>
	<!-- 已付全款 -->
	<block v-else-if="notice.type == 18">
		<view class="noticeBox">
			<text class="title">已支付全款</text>
			<text class="nociceText">{{ notice.courseName }}</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">买家昵称：</text>
					<text class="value">{{ notice.buyer }}</text>
				</view>
				<view class="row">
					<text class="label">订单金额：</text>
					<text class="value">{{ notice.price }}</text>
				</view>
			</view>
			<view class="opBox"><button @tap="toOrder" :data-id="notice.orderNo">查看详情</button></view>
		</view>
	</block>
	<!-- 订单超时未支付关闭 -->
	<block v-else-if="notice.type == 19">
		<view class="noticeBox">
			<text class="title">订单关闭</text>
			<text class="nociceText">{{ notice.courseName }}</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">买家昵称：</text>
					<text class="value">{{ notice.buyer }}</text>
				</view>
				<view class="row">
					<text class="label">订单金额：</text>
					<text class="value">{{ notice.price }}</text>
				</view>
			</view>
			<view class="opBox"><button @tap="toOrder" :data-id="notice.orderNo">查看详情</button></view>
		</view>
	</block>
	<!-- 买家申请退款 -->
	<block v-else-if="notice.type == 20">
		<view class="noticeBox">
			<text class="title">买家申请退款</text>
			<text class="nociceText">{{ notice.courseName }}</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">申请退款金额：</text>
					<text class="value">{{ notice.refundAmount }}</text>
				</view>
				<view class="row">
					<text class="label">退款原因：</text>
					<text class="value">{{ reasonList[notice.refundType] }}</text>
				</view>
			</view>
			<view class="opBox"><button @tap="toRefound" :data-id="notice.linkId">查看详情</button></view>
		</view>
	</block>
	<!-- 买家拒绝协商 -->
	<block v-else-if="notice.type == 21">
		<view class="noticeBox">
			<text class="title">买家拒绝协商</text>
			<text class="nociceText">{{ notice.courseName }}</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">申请退款金额：</text>
					<text class="value">{{ notice.refundAmount }}</text>
				</view>
				<view class="row">
					<text class="label">退款原因：</text>
					<text class="value">{{ reasonList[notice.refundType] }}</text>
				</view>
			</view>
			<view class="opBox"><button @tap="toRefound" :data-id="notice.linkId">查看详情</button></view>
		</view>
	</block>
	<!-- 平台已处理 -->
	<block v-else-if="notice.type == 22">
		<view class="noticeBox">
			<text class="title">平台客服已处理</text>
			<text class="nociceText">{{ notice.courseName }}</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">申请退款金额：</text>
					<text class="value">{{ notice.refundAmount }}</text>
				</view>
				<view class="row">
					<text class="label">退款原因：</text>
					<text class="value">{{ reasonList[notice.refundType] }}</text>
				</view>
			</view>
			<view class="opBox"><button @tap="toRefound" :data-id="notice.linkId">查看详情</button></view>
		</view>
	</block>
	<!-- 课程库存预警 -->
	<block v-else-if="notice.type == 23">
		<view class="noticeBox">
			<text class="title">课程库存预警</text>
			<text class="nociceText">{{ notice.courseName }}</text>
			<text class="nociceText">该课程库存不足，即将告罄，请尽快补充库存</text>
		</view>
	</block>
	<!-- 课程售罄 -->
	<block v-else-if="notice.type == 24">
		<view class="noticeBox">
			<text class="title">课程库存告罄</text>
			<text class="nociceText">{{ notice.courseName }}</text>
			<text class="nociceText">该课程已售空，用户已无法购买，请尽快补充库存</text>
		</view>
	</block>
	<!-- 卖家申请协商 -->
	<block v-else-if="notice.type == 25">
		<view class="noticeBox">
			<text class="title title2">{{ notice.storeName }}</text>
			<text class="orderStatus">卖家请求协商</text>
			<text class="nociceText">{{ notice.courseName }}</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">退款金额：</text>
					<text class="value">￥{{ notice.refundAmount }}</text>
				</view>
				<view class="row">
					<text class="label">退款原因：</text>
					<text class="value">{{ reasonList[notice.refundType] }}</text>
				</view>
			</view>
			<view class="opBox"><button @tap="toRefound" :data-id="notice.linkId">查看详情</button></view>
		</view>
	</block>
	<!-- 卖家同意退款 -->
	<block v-else-if="notice.type == 26">
		<view class="noticeBox">
			<text class="title title2">{{ notice.storeName }}</text>
			<text class="orderStatus">卖家同意退款</text>
			<text class="nociceText">{{ notice.courseName }}</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">退款金额：</text>
					<text class="value">￥{{ notice.refundAmount }}</text>
				</view>
				<view class="row">
					<text class="label">退款原因：</text>
					<text class="value">{{ reasonList[notice.refundType] }}</text>
				</view>
			</view>
			<view class="opBox"><button @tap="toRefound" :data-id="notice.linkId">查看详情</button></view>
		</view>
	</block>
	<!-- 卖家申请平台介入 -->
	<block v-else-if="notice.type == 27">
		<view class="noticeBox">
			<text class="title title2">{{ notice.storeName }}</text>
			<text class="orderStatus">卖家申请平台介入</text>
			<text class="nociceText">{{ notice.courseName }}</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">退款金额：</text>
					<text class="value">￥{{ notice.refundAmount }}</text>
				</view>
				<view class="row">
					<text class="label">退款原因：</text>
					<text class="value">{{ reasonList[notice.refundType] }}</text>
				</view>
			</view>
			<view class="opBox"><button @tap="toRefound" :data-id="notice.linkId">查看详情</button></view>
		</view>
	</block>
	<!-- 考勤签到 -->
	<block v-else-if="notice.type == 28">
		<view class="noticeBox">
			<text class="title">考勤签到</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">店铺名称：</text>
					<text class="value">{{ notice.storeName }}</text>
				</view>
				<view class="row">
					<text class="label">班级名称：</text>
					<text class="value">{{ notice.className }}</text>
				</view>
				<view class="row">
					<text class="label">学员姓名：</text>
					<text class="value">{{ notice.title }}</text>
				</view>
				<view class="row">
					<text class="label">课程名称：</text>
					<text class="value">{{ notice.courseName }}</text>
				</view>
				<view class="row">
					<text class="label">考勤类型：</text>
					<text class="value">{{ workArr[notice.status] }}</text>
				</view>
				<view class="row">
					<text class="label">考勤时间：</text>
					<text class="value">{{ notice.createTime }}</text>
				</view>
				<view class="row">
					<text class="label">温馨提示：</text>
					<text class="value">如考勤有误，请联系商家在考勤后的48小时内修改</text>
				</view>
			</view>
			<view class="opBox"><button @tap="toTim">在线反馈</button></view>
		</view>
	</block>
	<!-- 考勤签到修改 -->
	<block v-else-if="notice.type == 29">
		<view class="noticeBox">
			<text class="title">考勤签到修改</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">店铺名称：</text>
					<text class="value">{{ notice.storeName }}</text>
				</view>
				<view class="row">
					<text class="label">班级名称：</text>
					<text class="value">{{ notice.className }}</text>
				</view>
				<view class="row">
					<text class="label">学员姓名：</text>
					<text class="value">{{ notice.title }}</text>
				</view>
				<view class="row">
					<text class="label">课程名称：</text>
					<text class="value">{{ notice.courseName }}</text>
				</view>
				<view class="row">
					<text class="label">考勤类型：</text>
					<text class="value">{{ workArr[notice.status] }}</text>
				</view>
				<!-- <view class="row">
					<text class="label">考勤时间：</text>
					<text class="value">{{notice.createTime}}</text>
				</view> -->
				<view class="row">
					<text class="label">修改时间：</text>
					<text class="value">{{ notice.createTime }}</text>
				</view>
				<view class="row">
					<text class="label">温馨提示：</text>
					<text class="value">如考勤有误，请联系商家在考勤后的48小时内修改</text>
				</view>
			</view>
			<view class="opBox"><button @tap="toTim">在线反馈</button></view>
		</view>
	</block>
	<!-- 补课签到 -->
	<block v-else-if="notice.type == 30">
		<view class="noticeBox">
			<text class="title">补课签到</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">店铺名称：</text>
					<text class="value">{{ notice.storeName }}</text>
				</view>
				<view class="row">
					<text class="label">班级名称：</text>
					<text class="value">{{ notice.className }}</text>
				</view>
				<view class="row">
					<text class="label">学员姓名：</text>
					<text class="value">{{ notice.title }}</text>
				</view>
				<view class="row">
					<text class="label">课程名称：</text>
					<text class="value">{{ notice.courseName }}</text>
				</view>
				<view class="row">
					<text class="label">考勤类型：</text>
					<text class="value">补课签到</text>
				</view>
				<view class="row">
					<text class="label">考勤时间：</text>
					<text class="value">{{ notice.createTime }}</text>
				</view>
				<view class="row">
					<text class="label">温馨提示：</text>
					<text class="value">如考勤有误，请联系商家在考勤后的48小时内修改</text>
				</view>
			</view>
			<view class="opBox"><button @tap="toTim">在线反馈</button></view>
		</view>
	</block>
	<!-- 补课签到修改 -->
	<block v-else-if="notice.type == 31">
		<view class="noticeBox">
			<text class="title">补课签到修改</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">店铺名称：</text>
					<text class="value">{{ notice.storeName }}</text>
				</view>
				<view class="row">
					<text class="label">班级名称：</text>
					<text class="value">{{ notice.className }}</text>
				</view>
				<view class="row">
					<text class="label">学员姓名：</text>
					<text class="value">{{ notice.title }}</text>
				</view>
				<view class="row">
					<text class="label">课程名称：</text>
					<text class="value">{{ notice.courseName }}</text>
				</view>
				<view class="row">
					<text class="label">考勤类型：</text>
					<text class="value">取消补课签到</text>
				</view>
				<!-- <view class="row">
					<text class="label">考勤时间：</text>
					<text class="value">{{notice.createTime}}</text>
				</view> -->
				<view class="row">
					<text class="label">修改时间：</text>
					<text class="value">{{ notice.createTime }}</text>
				</view>
				<view class="row">
					<text class="label">温馨提示：</text>
					<text class="value">如考勤有误，请联系商家在考勤后的48小时内修改</text>
				</view>
			</view>
			<view class="opBox"><button @tap="toTim">在线反馈</button></view>
		</view>
	</block>
	<!-- 老师上课提醒 32 -->
	<block v-else-if="notice.type == 32">
		<view class="noticeBox">
			<text class="title">上课提醒</text>
			<view class="noticeCnt">
				<view class="row">
					<text class="label">班级名称：</text>
					<text class="value">{{ notice.className }}</text>
				</view>
				<view class="row">
					<text class="label">课程名称：</text>
					<text class="value">{{ notice.courseName }}</text>
				</view>
				<view class="row">
					<text class="label">上课时间：</text>
					<text class="value">{{ notice.reason }}</text>
				</view>
				<!-- <view class="row">
					<text class="label">考勤时间：</text>
					<text class="value">{{notice.createTime}}</text>
				</view> -->
				<view class="row">
					<text class="label">上课地点：</text>
					<text class="value">{{ notice.schoolRoom }}</text>
				</view>
				<view class="row">
					<text class="label">温馨提示：</text>
					<text class="value">{{ notice.teacherName }}老师，明天有课，可别迟到哦~</text>
				</view>
			</view>
			<!-- <view class="opBox">
				<button @tap="toTim">在线反馈</button>
			</view> -->
		</view>
	</block>
</template>

<script>
import { mapState, mapGetters, mapMutation, mapActions } from 'vuex';
export default {
	name: 'noticeItem', //组件名称
	// 传递参数
	props: {
		notice: {
			type: Object,
			default: () => {
				return {
					id: 0,
					storeId: 0,
					linkId: 0,
					courseName: '课程名称',
					storeName: '店铺名称',
					memberNick: '学员昵称',
					className: '班级名称',
					level: 2,
					type: 29,
					createTime: '2020-01-01 00:00:00',
					updateTime: '2020-01-01 00:00:00',
					refoundAmount: 0,
					reason: '原因',
					nickName: '买家昵称',
					price: 0,
					orderNo: '订单编号'
				};
			}
		}
	},
	// 组件参数
	data() {
		return {
			data1: 'value1',
			workArr: ['', '签到', '请假'],
			reasonList: ['', '不喜欢该课程', '课程效果未达到预期', '距离远，不想去', '多拍/错拍', '因个人原因无法继续上课', '因商家原因无法上课', '商家推荐了其他课程', '其他']
		};
	},
	// 组件方法
	methods: {
		// 跳转到退款详情
		toRefound(e) {
			let _id = e.currentTarget.dataset.id;
			this.toPage({
				url: 'refundOrderDt',
				orderId: _id
			});
		},
		// 跳转到订单详情
		toOrder(e) {
			let _id = e.currentTarget.dataset.id;
			this.toPage({
				url: 'orderDetail',
				orderId: _id
			});
		},
		toTim() {
			this.toPage({
				url: 'conversationDt',
				cvid: 'C2C' + this.notice.imid,
				toImId: this.notice.imid,
				sname: this.notice.storeName,
				sid: this.notice.linkId
			});
		}
	}
};
</script>

<style lang="less" scoped>
.noticeBox {
	width: 100%;
	display: flex;
	flex-direction: column;
	background-color: #ffffff;
	border-radius: 10upx;
	padding: 20upx 34upx;
	box-shadow: 0rpx 5rpx 24rpx 0rpx rgba(201, 202, 208, 0.15);
	margin-bottom: 20upx;
	.title {
		font-size: 32upx;
		font-weight: bold;
		padding-bottom: 20upx;
		border-bottom: 1px solid #eeeeee;
		margin-bottom: 20upx;
	}
	.title2 {
		font-weight: normal;
	}
	.orderStatus {
		font-size: 32upx;
		font-weight: bold;
		margin-bottom: 20upx;
	}
	.nociceText {
		font-size: 28upx;
		color: #888888;
		margin-bottom: 20upx;
	}
	.noticeCnt {
		display: flex;
		flex-direction: column;
		margin-bottom: 20upx;

		.row {
			display: flex;
			font-size: 28upx;
			color: #888888;

			.label {
				flex-shrink: 0;
			}
		}
	}

	.opBox {
		width: 100%;
		display: flex;
		justify-content: flex-end;

		button {
			height: 50upx;
			border: 2upx solid #909090;
			font-size: 28upx;
			background-color: rgba(0, 0, 0, 0);
			line-height: 46upx;
			margin: 0;
			border-radius: 25upx;
			color: #909090;
			padding: 0 20upx;
		}
	}
}
</style>
